//
//  NSDate+NSDate_Additional.h
//  Pods
//
//  Created by sunhaiyan on 16/6/28.
//
//

#import <Foundation/Foundation.h>

@interface NSDate (NSDate_Additional)

/**
 *  获取文案，将NSDate 转换成NSString
 *
 *  @return 时间文案：今天 03:02
 */
- (NSString *)dateDescriptionString;

/**
 *  将文案转换成时间
 *
 *  @param string 要转换时间的字符串，如：2016-09-12 08:2:11
 *
 *  @return 时间
 */
+ (NSDate *)dateForBeijingTimeZoneFromString:(NSString *)string;

/**
 *  2个时间比较是否是同一天
 */
- (BOOL)isTheSameDay:(NSDate *)anotherDate;
- (BOOL)isTheSameWeak:(NSDate *)anotherDate;
- (BOOL)isTheSameMonth:(NSDate *)anotherDate;
- (BOOL)isTheSameYear:(NSDate *)anotherYear;

- (BOOL)isYesterday;
- (BOOL)isToday;
- (BOOL)isTomorrow;
- (BOOL)isTheDayAfterTomorrow;


/**
 * 获取日、月、年、小时、分钟、秒
 */
- (NSUInteger)day;
- (NSUInteger)month;
- (NSUInteger)year;
- (NSUInteger)hour;
- (NSUInteger)minute;
- (NSUInteger)second;
+ (NSUInteger)day:(NSDate *)date;
+ (NSUInteger)month:(NSDate *)date;
+ (NSUInteger)year:(NSDate *)date;
+ (NSUInteger)hour:(NSDate *)date;
+ (NSUInteger)minute:(NSDate *)date;
+ (NSUInteger)second:(NSDate *)date;


/**
 *  周几
 *
 *  @return @“星期一、、、星期五”
 */
- (NSString *)dayFromWeekday;
+ (NSString *)dayFromWeekday:(NSDate *)date;

@end
